package com.cburch.logisim.util;

import java.util.Locale;
import javax.swing.JMenuItem;

import com.cburch.logisim.Locale.LocaleManager;
import com.cburch.logisim.strings.StringGetter;
import com.cburch.logisim.strings.StringUtil;


public class Strings {
	
    public static LocaleManager toolsSource
        = new LocaleManager("com/cburch/logisim/resources", "tools");
    
    public static LocaleManager drawSource
    	= new LocaleManager("com/cburch/logisim/resources", "draw");
    
    public static LocaleManager analyzeSource
    	= new LocaleManager("com/cburch/logisim/resources", "analyze");

    public static LocaleManager circuitSource
    	= new LocaleManager("com/cburch/logisim/resources", "circuit");
    
    public static LocaleManager dataSource
    	= new LocaleManager("com/cburch/logisim/resources", "data");
    
    public static LocaleManager fileSource
    	= new LocaleManager("com/cburch/logisim/resources", "file");
    
    public static LocaleManager hexSource
    	= new LocaleManager("com/cburch/logisim/resources", "hex");
    
    public static LocaleManager logSource
    	= new LocaleManager("com/cburch/logisim/resources", "log");
    
    public static LocaleManager guiSource
    	= new LocaleManager("com/cburch/logisim/resources", "gui");
    
    public static LocaleManager menuSource
    	= new LocaleManager("com/cburch/logisim/resources", "menu");
    
    public static LocaleManager optsSource
    	= new LocaleManager("com/cburch/logisim/resources", "opts");
    
    public static LocaleManager prefsSource
    	= new LocaleManager("com/cburch/logisim/resources", "prefs");
    
    public static LocaleManager startSource
    	= new LocaleManager("com/cburch/logisim/resources", "start");
    
    public static LocaleManager stdSource
    	= new LocaleManager("com/cburch/logisim/resources", "std");
    
    public static LocaleManager legacySource
    	= new LocaleManager("com/cburch/logisim/resources", "legacy");
    
    public static LocaleManager utilSource
    	= new LocaleManager("com/cburch/logisim/resources", "util");
    
    public static LocaleManager projSource
    	= new LocaleManager("com/cburch/logisim/resources", "proj");
    
    
    public static String get(String key, LocaleManager source) {
        return source.get(key);
    }
    public static StringGetter getter(String key, LocaleManager source) {
        return source.getter(key);
    }
    
    public static StringGetter getter(String key, String arg, LocaleManager source) {
        return source.getter(key, arg);
    }
    
    public static String get(String key, String arg, LocaleManager source) {
        return StringUtil.format(source.get(key), arg);
    }
    
    public static String get(String key, String arg0, String arg1, LocaleManager source) {
        return StringUtil.format(source.get(key), arg0, arg1);
    }
    
    public static Locale[] getLocaleOptions(LocaleManager source) {
        return source.getLocaleOptions();
    }
    public static JMenuItem createLocaleMenuItem(LocaleManager source) {
        return source.createLocaleMenuItem();
    }
}